package com.sh.二叉树;

/**
 * @Auther: sh
 * @Version 1.0
 * @Description:
 */
public class 翻转二叉树 {
    public static void main(String[] args) {

    }

    public static TreeNode invertTree(TreeNode root) {
        if (root == null) {
            return null;
        }
//        TreeNode temp = root.left;
//        root.left = root.right;
//        root.right = temp;



        TreeNode left = invertTree(root.left);
        TreeNode right = invertTree(root.right);
//        root.left = right;
//        root.right = left;
        return root;
    }


}

